Conventionally, for example, there is a game system where an operation is performed using a game controller including a vibrator, and based on a control signal output from a game apparatus, a vibration is generated by the vibrator.
In the game system, however, even if the vibrator of the game controller is vibrated using the same vibration waveform, a vibration perceived by a player may be different depending on the use form in which the game controller is used.
Therefore, it is an object of an exemplary embodiment to provide a storage medium having stored therein an information processing program, an information processing system, an information processing apparatus, and an information processing method that are capable of imparting an appropriate vibration to a user in accordance with the use form of a device including a vibrator.
To achieve the above object, the exemplary embodiment can employ, for example, the following configurations. It should be noted that it is understood that, to interpret the descriptions of the claims, the scope of the claims should be interpreted only by the descriptions of the claims. If there is a conflict between the descriptions of the claims and the descriptions of the specification, the descriptions of the claims take precedence.
In an exemplary configuration of a non-transitory computer-readable storage medium having stored therein an information processing program according to the exemplary embodiment, a non-transitory computer-readable storage medium having stored therein an information processing program is executed by a computer included in an information processing apparatus for vibrating a vibrator of a device. The information processing program causes the computer to execute: generating vibration data for vibrating the vibrator; in accordance with a use form of the device, selecting a first function or a second function; based on an amplitude value in the vibration data and the selected function, setting a new amplitude value; and outputting vibration data including the set amplitude value to the device.
Based on the above, a function for adjusting the intensity of a vibration is selected in accordance with the use form of a device. Thus, it is possible to adjust a vibration to be imparted to a device including a vibrator to an appropriate vibration intensity corresponding to the use form.
Further, the second function may be a function in which a degree of increase in the new amplitude value is smaller than a degree of increase in the amplitude value in the vibration data.
Based on the above, when a vibration is relatively large, it is possible to adjust the intensity of the vibration so as not to be too strong.
Further, the second function may be a function in which as the amplitude value in the vibration data increases, a degree of increase in the new amplitude value decreases in a stepwise manner or in a gradually decreasing manner.
Based on the above, when a vibration is relatively large, it is possible to adjust the intensity of the vibration in a step-by-step manner or in a gradually decreasing manner so as not to be too strong.
Further, the second function may at least include a first sub-function and a second sub-function. In the setting of the new amplitude value, in a case where the second function is selected, either of a first value calculated using the amplitude value in the vibration data and the first sub-function, and a second value calculated using the amplitude value in the vibration data and the second sub-function may be selected, thereby setting the selected value as the new amplitude value.
Based on the above, a plurality of sub-functions are selected in accordance with the use form, and it is possible to separately use sub-functions between a relatively strong vibration and a relatively weak vibration. Consequently, it is possible to adjust the strong vibration to a suitable vibration intensity and also adjust a weak vibration to a suitable vibration intensity. Thus, it is possible to adjust vibrations to appropriate vibration intensities corresponding to the use form.
Further, in the setting of the new amplitude value, the first value and the second value may be compared, and a smaller one of the first value and the second value may be set as the new amplitude value.
Based on the above, it is possible to adjust the degree of decrease in an amplitude value using the plurality of sub-functions.
Further, the second function may at least include a first sub-function and a second sub-function. In the selection of the function, in a case where the second function is selected, and when the amplitude value in the vibration data is less than a predetermined threshold, the first sub-function may be selected, and when the amplitude value in the vibration data is equal to or greater than the threshold, the second sub-function may be selected.
Based on the above, one of sub-functions is selected depending on whether an amplitude value is less than a predetermined threshold or is equal to or greater than the predetermined threshold. Thus, it is possible to adjust an amplitude value without calculating a plurality of new amplitude values for an amplitude value before being adjusted.
Further, the first sub-function may include a monomial expression or a polynomial expression including a term for multiplying the amplitude value in the vibration data by a predetermined coefficient.
Based on the above, it is possible to adjust an amplitude value using a simple function.
Further, the second sub-function may be a function for converting the amplitude value in the vibration data into a predetermined upper limit value.
Based on the above, it is possible to set an upper limit of a new amplitude value.
Further, the first function may be a function in which as the amplitude value in the vibration data increases, a degree of increase in the new amplitude value becomes greater than in the second function.
Based on the above, even when a vibration is relatively large, a first function is selected for the use form in which the vibration is to be made relatively strong, whereby it is possible to adjust the vibration to an appropriate vibration intensity.
Further, in the setting of the new amplitude value, a new amplitude value may be set with respect to a plurality of frequency ranges.
Based on the above, it is possible to appropriately control an amplitude corresponding to a frequency band.
Further, the device including the vibrator may be a game controller capable of communicating with the information processing apparatus.
Based on the above, it is possible to appropriately adjust the intensity of a vibration to be imparted to a game controller used when a game operation is performed.
Further, the use form may include a first use form in which the device including the vibrator is detached from a main body of the information processing apparatus and used, and a second use form in which the device including the vibrator is attached to the main body of the information processing apparatus and used. In the selection of the function, different functions may be selected depending on whether the use form of the device is the first use form or the second use form.
Based on the above, it is possible to impart appropriate vibrations between the use form in which the device including the vibrator is detached from an information processing apparatus and used, and the use form in which the device including the vibrator is attached to the information processing apparatus and used.
Further, the use form may include a first use form in which a user uses the device including the vibrator by holding the device with one hand, and a second use form in which the user uses the device including the vibrator by holding the device with both hands. In the selection of the function, different functions may be selected depending on whether the use form of the device is the first use form or the second use form.
Based on the above, it is possible to deal with a change in a vibration perceived by a user, which changes depending on the manner of holding the device (holding the device with their palm, holding the device with their fingertips, or the like), or the area of the user's hand in contact with the device, a part of the user's hand in contact with the device, or the like.
Further, the use form may include a first use form in which a user uses a main body of the device including the vibrator by moving the main body, and a second use form in which the user uses the main body of the device including the vibrator by performing an input operation using an input device provided in the device including the vibrator. In the selection of the function, different functions may be selected depending on whether the use form of the device is the first use form or the second use form.
Based on the above, when an operation is performed by holding and swinging the device, it is difficult for a user to perceive the vibration of the device, whereas when an operation is performed without swinging the device, it is easy for the user to perceive the vibration of the device. It is, however, possible to impart an appropriate vibration to the device for such a difference in use form.
Further, the second function may be a function for calculating the new amplitude value to be a value relatively smaller than a value calculated based on the first function. In the selection of the function, when the use form of the device is the first use form, the first function may be selected, and when the use form of the device is the second use form, the second function may be selected.
Based on the above, a vibration is made relatively strong in the use form in which it is difficult to perceive a vibration by performing an operation by holding and swinging the device, whereby it is possible to make it easy for the user to perceive the vibration. Further, a vibration is made relatively weak in the use form in which it is easy to perceive a vibration by performing an operation without swinging the device, whereby it is possible to make it easy for the user to perceive an appropriate vibration.
Further, the exemplary embodiment may be carried out in the forms of an information processing system, an information processing apparatus, and an information processing method.
According to the exemplary embodiment, in either of an operation method using two operation devices and an operation method using a single operation device, it is possible to impart an appropriate vibration to a user of the operation devices.
These and other objects, features, aspects and advantages of the exemplary embodiments will become more apparent from the following detailed description of the exemplary embodiments when taken in conjunction with the accompanying drawings.